package com.qf.smsplatform.eureka.feign.feign;

import com.qf.smsplatform.eureka.feign.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Author: 姜祖聪
 * date: 2019/9/24 10:46
 * description:
 */
@FeignClient(value = "CACHESERVICE")
public interface FeignClientInterface {
    //当访问这个方法时会反向调用注解中的地址，参数会被传递到最后一个位置
    @RequestMapping("/cache/saveCache")
    void save(@RequestParam("key") String key,@RequestParam("value") String value,@RequestParam("expireSecond") Integer expireSecond);

    @RequestMapping(value = "/cache/getCache",method = RequestMethod.GET)
    String getKey(String key);

    @RequestMapping("/cache/test")
    public String test();
}
